<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGridHouseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('grid_house', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('grid_id')->default(0)->comment('网格id');
            $table->integer('type')->default(0)->comment('1实际2预选');
            $table->integer('house_type_id')->default(0)->comment('户型id');
            $table->integer('is_decorate')->default(0)->comment('是否装修1装修2不装修');
            $table->string('villager_ids')->default('')->comment('权益人ids');
            $table->integer('do_user_id')->default(0)->comment('操作者id');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `grid_house` comment '户型选择表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('grid_house');
    }
}
